<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/201706/zltc/Public/layui/css/layui.css"  media="all">
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body style="padding:15px;"> 
<form class="layui-form" action="">
  <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block">
      <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" value="<?php echo ($vo["title"]); ?>">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">关联用户id</label>
    <div class="layui-input-block">
      <input type="text" name="member_id" lay-verify="title" autocomplete="off" placeholder="请输入关联用户id" class="layui-input" value="<?php echo ($vo["member_id"]); ?>">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">关联商家id</label>
    <div class="layui-input-block">
      <input type="text" name="shop_id" lay-verify="title" autocomplete="off" placeholder="请输入关联商家id" class="layui-input" value="<?php echo ($vo["shop_id"]); ?>">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">关联商品id，多个商品使用英文“,”分隔</label>
    <div class="layui-input-block">
      <input type="text" name="goods" lay-verify="title" autocomplete="off" placeholder="请输入关联商品id" class="layui-input" value="<?php echo ($vo["goods"]); ?>">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">开始时间</label>
    <div class="layui-input-block">
      <input type="text" name="start_time" class="layui-input" id="start_time" placeholder="选择开始时间" value="<?php echo ($vo["start_time"]); ?>">
    </div>
  </div>
  
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="*">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>

<script src="/201706/zltc/Public/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
var pics = [<?php echo ($vo["pics"]); ?>];
layui.use(['form', 'laytpl', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,$ = layui.jquery
  ,laytpl = layui.laytpl
  ,laydate = layui.laydate;

  laydate.render({ 
    elem: '#start_time'
    ,type: 'datetime'
  });
  //监听提交
  form.on('submit(*)', function(data){
    var post_data = data.field;
    $.post('#', post_data, function(e) {
      layer.alert(e.info,function(index){
        if(e.status == 1){
          parent.location.reload();
        }else{
          layer.close(index);
        }
      });
    });
    return false;
  });
  
  
});
</script>

</body>
</html>